package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/10/24.
 */
@Entity
@Table(name = "product_share")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class ProductShare extends IDEntityMall {
    @Column(columnDefinition = "bigint comment'产品ID'")
    private Long productId;
    @Column(columnDefinition = "varchar(255) comment'分享码'")
    private String shareCode;
    @Column(columnDefinition = "bigint comment'分享的用户ID'")
    private Long sharedCustomerId;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getShareCode() {
        return shareCode;
    }

    public void setShareCode(String shareCode) {
        this.shareCode = shareCode;
    }

    public Long getSharedCustomerId() {
        return sharedCustomerId;
    }

    public void setSharedCustomerId(Long sharedCustomerId) {
        this.sharedCustomerId = sharedCustomerId;
    }

    @Override
    public String toString() {
        return "ProductShare{" +
                "productId=" + productId +
                ", id=" + id +
                ", shareCode='" + shareCode + '\'' +
                ", sharedCustomerId=" + sharedCustomerId +
                ", dateCreated=" + dateCreated +
                ", lastUpdated=" + lastUpdated +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
